package com.itlong.cloud.project.property;

import com.itlong.cloud.POJO.DTO.property.PropertyProjectExportAddressesDTO;
import com.itlong.cloud.POJO.DTO.property.PropertyProjectSaveImportAddressDTO;
import com.itlong.cloud.POJO.VO.property.PropertyProjectRoomInfoVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * <desc>
 *      地址信息服务接口协议提供对象.(如导入、导出)
 * </desc>
 *
 * @createDate 2017-10-17
 */
@FeignClient(name = "project-service")
public interface IPropertyAddressInfoServiceClient {

    /**
     * <desc>
     *      保存通过Excel文件导入的地址信息
     * </desc>
     * @param propertyProjectSaveImportAddressDTO 从Excel(*.xls)导入地址信息数据传输对象(含楼栋列表、单元列表、房间列表,用于保存到数据库)
     * @return 受影响的行数
     * @author LouisLewis
     * @createDate 2017-10-23
     */
    @RequestMapping(path = "property/addressInfo/saveImportAddressInfo",method = {RequestMethod.POST})
    Integer saveImportAddressInfo(@RequestBody PropertyProjectSaveImportAddressDTO propertyProjectSaveImportAddressDTO) throws Exception;


    /**
     * <desc>
     *      按楼栋Id列表查询房间信息(用于导出)
     * </desc>
     *
     * @param propertyProjectImportAddressExtraDataDTO 导出地址信息到Excel(*.xls)数据传输对象
     * @return 房屋信息列表
     * @author LouisLewis
     * @createDate 2017-10-16
     */
    @RequestMapping(path = "property/addressInfo/getExportAddressInfo",method = {RequestMethod.POST})
    List<PropertyProjectRoomInfoVO> getExportAddressInfo(@RequestBody PropertyProjectExportAddressesDTO propertyProjectImportAddressExtraDataDTO);
}
